package com.xinongbest;

import com.xinongbest.entity.Apple;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class SpringApplication {
    public static void main(String[] args) {
        ApplicationContext context = new ClassPathXmlApplicationContext("classpath:applicationContextBase.xml");
        System.out.println(context.getBean("apple", Apple.class));
        System.out.println(context);
        ((ClassPathXmlApplicationContext) context).registerShutdownHook();
    }
}
